export type NodeJsMirrorSource = "npmmirror" | "huaweicloud";

export interface NodeVersionInfo {
  version: string;
  lastModified: string;
}

export interface NodejsMirror {
  readonly name: NodeJsMirrorSource;
  readonly displayName: string;
  readonly mirrorUrl: string;

  /**
   * 获取版本列表
   */
  getVersionList(): Promise<NodeVersionInfo[]>;

  /**
   * 获取下载地址
   * @param version
   */
  getDownloadUrl(version: string): string;
}
